Hello |
Re: How can I store a Password using dxl?
Well I guess a reasonable place for storing the password is the user profile directory, since that usually is something where only the user should have access. So you could string dir = getenv "USERPROFILE" // ... make sub directory, store to file ... and make a subdirectory for your application. Another place to store it would be the user config area of the DOORS database but I would not recommend that, since DOORS data is inherently insecure.
Buffer decryptBuffer__ (Buffer src, Buffer dest) Buffer encryptBuffer__ (Buffer src, Buffer dest)
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: How can I store a Password using dxl? Mathias Mamsch - Thu Jan 24 06:00:47 EST 2013
Well I guess a reasonable place for storing the password is the user profile directory, since that usually is something where only the user should have access. So you could string dir = getenv "USERPROFILE" // ... make sub directory, store to file ... and make a subdirectory for your application. Another place to store it would be the user config area of the DOORS database but I would not recommend that, since DOORS data is inherently insecure.
Buffer decryptBuffer__ (Buffer src, Buffer dest) Buffer encryptBuffer__ (Buffer src, Buffer dest)
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
Hello Mathias
string Encrypt(string sToEncrypt) {
Buffer bufInput = create();
Buffer bufOutput = create();
bufInput = sToEncrypt;
encryptBuffer__ (bufInput, bufOutput);
string sOut = stringOf(bufOutput);
delete(bufInput);
delete(bufOutput);
return (sOut);
}
string Decrypt(string sToDecrypt) {
Buffer bufInput = create();
Buffer bufOutput = create();
bufInput = sToDecrypt;
decryptBuffer__ (bufInput, bufOutput);
string sOut = stringOf(bufOutput);
delete(bufInput);
delete(bufOutput);
return (sOut);
}
// PasswordModuleInit();
string sH = Encrypt("UserName:Ich;Password:Du");
print ":" sH ":\n";
sH = Decrypt("150191176220182162185176164177164212166186162180182183202173148115124182");
print ":" sH ":\n";
If have made some experiments using the third buffer
Buffer bufHelp = decryptBuffer__ (bufInput, bufOutput);
string Encrypt(string sToEncrypt) {
Buffer bufInput = create();
Buffer bufOutput = create();
bufInput = sToEncrypt;
Buffer bufHelp = decryptBuffer__ (bufInput, bufOutput);
string sOut = stringOf(bufOutput);
delete(bufInput);
delete(bufOutput);
delete(bufHelp);
return (sOut);
}
|
Re: How can I store a Password using dxl? SystemAdmin - Thu Jan 24 07:33:48 EST 2013
Hello Mathias
string Encrypt(string sToEncrypt) {
Buffer bufInput = create();
Buffer bufOutput = create();
bufInput = sToEncrypt;
encryptBuffer__ (bufInput, bufOutput);
string sOut = stringOf(bufOutput);
delete(bufInput);
delete(bufOutput);
return (sOut);
}
string Decrypt(string sToDecrypt) {
Buffer bufInput = create();
Buffer bufOutput = create();
bufInput = sToDecrypt;
decryptBuffer__ (bufInput, bufOutput);
string sOut = stringOf(bufOutput);
delete(bufInput);
delete(bufOutput);
return (sOut);
}
// PasswordModuleInit();
string sH = Encrypt("UserName:Ich;Password:Du");
print ":" sH ":\n";
sH = Decrypt("150191176220182162185176164177164212166186162180182183202173148115124182");
print ":" sH ":\n";
If have made some experiments using the third buffer
Buffer bufHelp = decryptBuffer__ (bufInput, bufOutput);
string Encrypt(string sToEncrypt) {
Buffer bufInput = create();
Buffer bufOutput = create();
bufInput = sToEncrypt;
Buffer bufHelp = decryptBuffer__ (bufInput, bufOutput);
string sOut = stringOf(bufOutput);
delete(bufInput);
delete(bufOutput);
delete(bufHelp);
return (sOut);
}
|